import axios from 'axios'; //导入axios模块
export const getTodoList = params => { //封装一个函数，名为getTodoList
  return axios.get(`/todo/list`, { // 请求路径 ‘/todo/list’
    params: params
  });
};
export const addTodo = params => {
  return axios.post(`/todo/addTodo`, params).then(res => {
    return res.data
  });
};

export const getMenus = params => {
  return axios.get(`/todo/menus`, params).then(res => res.data);
};

export const getApi = params => {
  return axios.get(`/api/demoapi`, params).then(res => res.data);
};
export const authToken = token => {
  console.log(token)
  return axios.get(`/auth/auth-token`, {params:{token:token}}).then(res => {  console.log(res);return res.data});
};
